import type { RouteRecordRaw } from "vue-router";
/**
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      hidden：        是否隐藏此路由
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    name: "Login",
    // redirect: '/Login',
    component: () => import("@/views/login/index.vue"),
    meta: {
      hidden: true,
    },
  },

  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
    meta: {
      hidden: true,
    },
  },

  {
    path: '/',
    redirect: '/home'
  },
  // 首页路由
  {
    path: "/home",
    name: 'Home',
    component: () => import("@/layout/index.vue"),
    meta: {
      title: "首页",
      icon: "ele-House",
    }
  },

  // 总经办路由
  {
    path: "/GeneralManager",
    component: () => import("@/layout/index.vue"),
    meta: {
      title: "总经办",
      icon: "ele-DocumentCopy",
    },
    children: [
      {
        path: "/Job",
        name: "Job",
        component: () => import("@/views/GeneralManager/job/index.vue"),
        meta: {
          title: "荣杨-作业模块",
        },
        children: [
          {
            path: "/job/Samplequotation",
            name: "Job",
            component: () => import("@/views/GeneralManager/job/Samplequotation.vue"),
            meta: {
              title: "样品报价输入",
            },
          },
        ]
      },
      {
        path: "/inquire",
        name: "Inquire",
        component: () => import("@/views/GeneralManager/inquire/index.vue"),
        meta: {
          title: "荣杨-查询模块",
        },
        children: [
          {
            path: "/inquire/OrderSummary",
            name: "OrderSummary",
            component: () => import("@/views/GeneralManager/inquire/OrderSummary.vue"),
            meta: {
              title: "订单汇总",
            },
          },
          {
            path: "/inquire/AggregateScheduling",
            name: "AggregateScheduling",
            component: () => import("@/views/GeneralManager/inquire/AggregateScheduling.vue"),
            meta: {
              title: "总进度查询",
            },
          },
          {
            path: "/inquire/MateRisls",
            name: "MateRisls",
            component: () => import("@/views/GeneralManager/inquire/materials.vue"),
            meta: {
              title: "材料库存查询",
            },
          },
          {
            path: "/inquire/ProduCtion",
            name: "ProduCtion",
            component: () => import("@/views/GeneralManager/inquire/production.vue"),
            meta: {
              title: "生产动态查询",
            },
          },
        ]
      },


    ],
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "业务部",
      icon: "ele-Document",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "开发部",
      icon: "ele-Notification",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "技术部",
      icon: "ele-PieChart",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "生控部",
      icon: "ele-MessageBox",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "采购部",
      icon: "ele-Finished",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "仓储部",
      icon: "ele-VideoPlay",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "成控部",
      icon: "ele-DataAnalysis",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "财务部",
      icon: "ele-Tickets",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "生产部",
      icon: "ele-Filter",
    },
  },
  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "行政人事",
      icon: "ele-Avatar",
    },
  },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "系统-管理模块",
  //     icon: "ele-Operation",
  //   },
  //   children: [
  //     {
  //       path: "/product/trademark/list",
  //       name: "Trademark",
  //       component: () => import("@/views/product/trademark/index.vue"),
  //       meta: {
  //         title: "品牌管理",
  //       },
  //     },
  //     {
  //       path: "/product/attr/list",
  //       name: "Attr",
  //       component: () => import("@/views/product/attr/index.vue"),
  //       meta: {
  //         title: "平台属性管理",
  //       },
  //     },
  //     {
  //       path: "/product/sku/list",
  //       name: "Sku",
  //       component: () => import("@/views/product/sku/index.vue"),
  //       meta: {
  //         title: "SKU管理",
  //       },
  //     },
  //     {
  //       path: "/product/spu/list",
  //       name: "Spu",
  //       component: () => import("@/views/product/spu/index.vue"),
  //       meta: {
  //         title: "SPU管理",
  //       },
  //     },
  //   ],
  // },
];

export const allAsyncRoutes: Array<RouteRecordRaw> = [
  // 异步路由

  {
    path: "/product",
    component: () => import("@/layout/index.vue"),
    // redirect: '/product/trademark/index.vue',
    name: "Product",
    meta: {
      title: "业务部",
      icon: "ele-House",
    }
  },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "开发部",
  //     icon: "ele-DocumentCopy",
  //   },
  //   children: [
  //     {
  //       path: "/product2",
  //       component: () => import("@/layout/index.vue"),
  //       // redirect: '/product/trademark/index.vue',
  //       name: "Product",
  //       meta: {
  //         title: "荣杨-开发作业",
  //       },
  //       children: [
  //         {
  //           path: "trademark/list",
  //           name: "Trademark",
  //           component: () => import("@/views/product/trademark/index.vue"),
  //           meta: {
  //             title: "品牌管理",
  //           },
  //         },
  //         {
  //           path: "attr/list",
  //           name: "Attr",
  //           component: () => import("@/views/product/attr/index.vue"),
  //           meta: {
  //             title: "平台属性管理",
  //           },
  //         },
  //         {
  //           path: "sku/list",
  //           name: "Sku",
  //           component: () => import("@/views/product/sku/index.vue"),
  //           meta: {
  //             title: "SKU管理",
  //           },
  //         },
  //         {
  //           path: "spu/list",
  //           name: "Spu",
  //           component: () => import("@/views/product/spu/index.vue"),
  //           meta: {
  //             title: "SPU管理",
  //           },
  //         },
  //       ]
  //     },
  //     {
  //       path: "/product2",
  //       component: () => import("@/layout/index.vue"),
  //       // redirect: '/product/trademark/index.vue',
  //       name: "Product",
  //       meta: {
  //         title: "荣杨-查询模块",
  //       },
  //       children: [
  //         {
  //           path: "trademark/list",
  //           name: "Trademark",
  //           component: () => import("@/views/product/trademark/index.vue"),
  //           meta: {
  //             title: "品牌管理",
  //           },
  //         },
  //         {
  //           path: "attr/list",
  //           name: "Attr",
  //           component: () => import("@/views/product/attr/index.vue"),
  //           meta: {
  //             title: "平台属性管理",
  //           },
  //         },
  //         {
  //           path: "sku/list",
  //           name: "Sku",
  //           component: () => import("@/views/product/sku/index.vue"),
  //           meta: {
  //             title: "SKU管理",
  //           },
  //         },
  //         {
  //           path: "spu/list",
  //           name: "Spu",
  //           component: () => import("@/views/product/spu/index.vue"),
  //           meta: {
  //             title: "SPU管理",
  //           },
  //         },
  //       ]
  //     },
  //   ],

  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "技术部",
  //     icon: "ele-GoodsFilled",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "生控部",
  //     icon: "ele-Message",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "采购部",
  //     icon: "ele-GoodsFilled",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "仓储部",
  //     icon: "ele-GoodsFilled",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "成控部",
  //     icon: "ele-EditPen",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "财务部",
  //     icon: "ele-EditPen",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "生产部",
  //     icon: "ele-EditPen",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   // redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "行政人事",
  //     icon: "ele-GoodsFilled",
  //   },
  // },
  // {
  //   path: "/product",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: '/product/trademark/index.vue',
  //   name: "Product",
  //   meta: {
  //     title: "系统-管理模块",
  //     icon: "ele-EditPen",
  //   },
  //   children: [
  //     {
  //       path: "/product/trademark/list",
  //       name: "Trademark",
  //       component: () => import("@/views/product/trademark/index.vue"),
  //       meta: {
  //         title: "品牌管理",
  //       },
  //     },
  //     {
  //       path: "/product/attr/list",
  //       name: "Attr",
  //       component: () => import("@/views/product/attr/index.vue"),
  //       meta: {
  //         title: "平台属性管理",
  //       },
  //     },
  //     {
  //       path: "/product/sku/list",
  //       name: "Sku",
  //       component: () => import("@/views/product/sku/index.vue"),
  //       meta: {
  //         title: "SKU管理",
  //       },
  //     },
  //     {
  //       path: "/product/spu/list",
  //       name: "Spu",
  //       component: () => import("@/views/product/spu/index.vue"),
  //       meta: {
  //         title: "SPU管理",
  //       },
  //     },
  //   ],
  // },
];

export const anyRoute: RouteRecordRaw = {
  path: "/:pathMatch(.*)",
  name: "Any",
  redirect: "/",
  meta: {
    hidden: true,
  },
};

